/*
 * Singularity Engine
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */

/**
 * 
 */
package org.singularity.mapred;

/**
 * This interface introduces a notion of an abstract element 
 * of a cascade i.e. vertex of a graph.
 * 
 * @author vjache
 *
 */
public interface Element {
	/**
	 * A code of a concrete element.
	 * 
	 * @author vjache
	 *
	 */
	static enum Code
	{
		/**
		 * Reduce element code.
		 * @see ReduceElement
		 */
		Reducer,
		/**
		 * Output element code.
		 * @see OutputElement
		 */
		Output,
		/**
		 * Input element code.
		 * @see InputElement
		 */
		Input;
	}
	/**
	 * Returns a parent cascade this element belongs to.
	 */
	Cascade getCascade();
	/**
	 * Returns a code of this concrete element.
	 */
	Code getElementCode();
	/**
	 * Returns an identifier of this element unique in parent cascade.
	 */
	Object getId();
}
